/**
 * Created by tanjian on 2017/4/11.
 */
var path = require('path');
var webpack = require('webpack');
module.exports = {
    entry: {
        index:path.resolve(__dirname, './src/controller/indexController.js')
    },
    output: {
        path: path.resolve(__dirname, './dist/js'),
        filename: '[name].bundle.js',
    },
    module: {
        loaders: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                loader: "babel-loader",
                query:
                    {
                        presets:['react','es2015']
                    }
            }, {
                test: /\.scss$/,
                loaders: ['style', 'css', 'sass'],
                include: path.resolve(path.resolve(path.resolve(__dirname), 'build'), 'app')
            }, {
                test: /\.(png|jpg)$/,
                loader: 'url-loader?limit=40000'
            },
            {
                test: /\.css$/,
                loader: "style-loader!css-loader"
            }
        ]
    },
    devServer: {
        hot: true,
        inline: true
    },
    plugins: [
        new webpack.NoErrorsPlugin(),
        new webpack.HotModuleReplacementPlugin()
    ]
};